package com.dfrz.stockMarket.web;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dfrz.stockMarket.bean.UserBean;
import com.dfrz.stockMarket.model.UserOrderModel;
import com.dfrz.stockMarket.service.UserService;

import javafx.scene.chart.PieChart.Data;

public class CellCtrl extends BaseController{
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		System.out.println("开心");
		Integer costPrice = Integer.parseInt(req.getParameter("costPrice"));
		Integer Codeid= Integer.parseInt(req.getParameter("Codeid"));
		Integer stockQuantity = Integer.parseInt(req.getParameter("stockQuantity"));
		System.out.println("costPrice:"+costPrice);
		System.out.println("Codeid:"+Codeid);
		System.out.println("stockQuantity:"+stockQuantity);
		/*UserBean userBean = getSessionUserBean(req);
		System.out.println("userorderbean"+userBean);
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式	
		System.out.println("当前时间："+new Date());
		Date data=new Date();
		UserOrderModel userorder=new UserOrderModel(userBean.getUserInfoModel().getUserID(), Codeid, 1, stockQuantity, costPrice, data);
		UserService service = new UserService();
		try {
			service.saveUserOrderModel(userorder);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	*/
	}
}